/*
  File:    random.h
  Purpose: To provide superior random number generators, 
           as compared to the standard rand() function. 

  Contact: Paul Macklin
           pmacklin@math.uci.edu
		   http://math.uci.edu/~pmacklin
*/

void SeedRandom( void );
 
// in all of these, amazing > great > good

#ifndef __random__
#define __random__

/*
#define IA 16807
#define IM 2147483647
#define AM (1.0/IM)
#define IQ 127773
#define IR 2836
#define NTAB 32
#define NDIV (1+(IM-1)/NTAB)
#define RANDEPS 1.2e-7
#define RNMX (1.0-RANDEPS)
*/
/*
#define IM1 2147483563
#define IM2 2147483399
#define AM_Great (1.0/IM1) 
#define IMM1 (IM1-1)
#define IA1 40014
#define IA2 40692
#define IQ1 53668
#define IQ2 52774
#define IR1 12211
#define IR2 3791
#define NDIV_Great (1+IMM1/NTAB)
*/

/*
#define MBIG 1000000000
#define MSEED 161803398
#define MZ 0
#define FAC (1.0/MBIG)
*/

#endif

// the ran1 in Numerical Recipes in C
// a pretty darned good random number generator
// use this if you expect to use fewer than 100,000,000 calls 
// Must be seeded with a negative number!!

float GoodUniformRandom( void );

// the ran2 in Numerical Recipes in C
// a pretty darned great random number generator
// use this if you expect to use greater than 100,000,000 calls 
// Must be seeded with a negative number!!

float GreatUniformRandom(void);

float KnuthUniformRandom(void);

// gives normal distribution with mean 0, variance 1;

float NormalRandom(void);
